package com.yuan.pay_mall.controller;

import com.yuan.pay_mall.service.ICategoryService;
import com.yuan.pay_mall.vo.CategoryVo;
import com.yuan.pay_mall.vo.ResponseVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
/*商品分类*/
@RestController
public class CategoryController {
    @Autowired
    private ICategoryService categoryService;


    @GetMapping("/categories")  //http://localhost:8080/categories
    public ResponseVo<List<CategoryVo>> selectAll(){
        return categoryService.selectAll();
    }
}


